import { BaseEntity } from '@/modules/core/base/BaseEntity';
import { MediaEntiry } from '@/modules/media/entities/Media.entity';
import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from 'typeorm';

@Entity('banner')
export class BannerEntity extends BaseEntity {
  @Column({
    comment: '标题',
  })
  title: string;

  @Column({
    comment: '描述',
  })
  desc: string;

  @ManyToOne((type) => MediaEntiry, (media) => media.banner)
  media: MediaEntiry;
}
